package com.lkd.controller;


import com.lkd.service.NodeService;
import com.lkd.vo.NodeVo;
import com.lkd.vo.PageBean;
import com.lkd.vo.RegionVo;
import com.lkd.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 点位表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-08-20
 */
@RestController
public class NodeController {

@Autowired
private NodeService nodeService;

    //查询区域详情
    @GetMapping("/api/vm-service/node/search")
    public Result findRegionByPage(
            Long regionId,
            @RequestParam(defaultValue = "1") Integer pageIndex,
            @RequestParam(defaultValue = "10")Integer pageSize
    ){
        PageBean<NodeVo> pageBean=nodeService.findNodeByPage(regionId,pageIndex,pageSize);
        return Result.success (pageBean);
    }
}
